home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00574_error scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  738 b   |  25 lines

  1. global gInError
  2.  
  3. on error errNum
  4.   global gPrintErrors, gLogErrors
  5.   if gInError = "InError" then
  6.     return 
  7.   end if
  8.   set gInError to "InError"
  9.   if gPrintErrors then
  10.     if errNum < 0 then
  11.       alert("Error " & errNum)
  12.     else
  13.       alert("Error TRS-" & errNum & ": " & field ("Error " & errNum))
  14.     end if
  15.   end if
  16.   if gLogErrors then
  17.     if errNum < 0 then
  18.       appendTextFile("@\errors.log", RETURN & the date & TAB & the time & TAB & getState() & TAB & errNum & TAB & "Error " & errNum)
  19.     else
  20.       appendTextFile("@\errors.log", RETURN & the date & TAB & the time & TAB & getState() & TAB & errNum & TAB & "Error TRS-" & errNum & ": " & field ("Error " & errNum) & RETURN)
  21.     end if
  22.   end if
  23.   set gInError to EMPTY
  24. end
  25.